Skip to main content

closeCard

Type

message

Summary

Sent to the current card when the user goes to another card.

Syntax

closeCard

Description

Handle the closeCard message if you want to perform cleanup or do other tasks when the user leaves a card.

A card is closed when the user either goes to another card in the same stack, or closes the stack.

The actual navigation is not triggered by the closeCard message, so trapping the message and not allowing it to pass does not prevent the card from closing.

Examples

on closeCard -- record date and time the card was last viewed
-- in a custom property of the card
set the lastAccessDate of the target to the seconds
pass closeCard
end closeCard

glossary: trap, current card, message

keyword: card

message: closeStack, shutdown, closeBackground, preOpenCard

control structure: pass

Compatibility and Support

Introduced

LiveCode 1.0

OS

mac

windows

linux

ios

android

Platforms

desktop

server

mobile

Thank you for your feedback!

Was this page helpful?